package Util;

import com.necsv.R;
import android.app.Activity;
import android.content.Context;
import android.telephony.TelephonyManager;
import android.widget.LinearLayout;

import com.google.ads.Ad;
import com.google.ads.AdListener;
import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;
import com.google.ads.AdRequest.ErrorCode;

public class AdMobLoader {
	
	public static void initAdmod(Context context){
		TelephonyManager tManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
		// String uid = tManager.getDeviceId();
		AdView adView = new AdView((Activity) context, AdSize.BANNER, "a14fbeddfb1f19f");
		AdRequest adRequest = new AdRequest();
		adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
		adRequest.addTestDevice("444ADB7C5C1747E68D623A1919FF5F87");
		//adRequest.addTestDevice(uid);
		LinearLayout layout = (LinearLayout) ((Activity)context).findViewById(R.id.adModView);
		layout.addView(adView);
		adView.loadAd(adRequest);
		
	}
}
